
		<div class="easyui-layout" data-options="fit:true">
			<table id="expenseTable" class="easyui-datagrid" style="height:100%;">
		
			</table>
			<div id="expense_tb" >
				日期：
				
				<input id="expense_startTime" value='${startTime! }' class="easyui-datebox theme-textbox-radius"  data-options="editable: false"/>~
				<input id="expense_endTime" value='${date(),dateFormat="yyyy-MM-dd"}' class="easyui-datebox theme-textbox-radius" data-options="editable: false"/>
				<!-- <input id="startTime" value='${startTime! }' class="easyui-datebox theme-textbox-radius"  data-options="editable: false"/>~
				<input id="endTime" value='${date(),dateFormat="yyyy-MM-dd"}' class="easyui-datebox theme-textbox-radius" data-options="editable: false"/> -->
			</div>
		</div>
		<script type="text/javascript">
			$(document).ready(function () {
				//加载数据表格
				loadExpenseTable();
				$('#expense_startTime').datebox({
					onSelect: function(date){
						
						loadExpenseTable();
					}
				});
				$('#expense_endTime').datebox({
					onSelect: function(date){
						loadExpenseTable();
					}
				});
			});
			
			function  loadExpenseTable() {
				
				var startTime = $("#expense_startTime").val();
				alert(startTime)
				var endTime = $("#expense_endTime").val();
				$('#expenseTable').datagrid({
					cls: "theme-datagrid",
					toolbar: '#expense_tb',
					singleSelect: true,
					rownumbers: true, //显示序号
					pagination: true,
					pageSize: 10,
					fitColumns:true,
					url: "${cxt!}/customerInfoStatistic/lookCustomerExpense",
					queryParams: {
						'_query.customerIds': '${customerIds! }',
						'_query.startTime': startTime,
						'_query.endTime': endTime
					},
				    method: 'post',
					collapsible: true,
					columns:[[
								{field:'ids',title:'ids',width:100,align:'center',hidden:true},
								{field:'ordernumber',title:'消费单号',width:120,align:'center'},
								{field:'receivable',title:'应收款',width:100,align:'center'},
								{field:'proceeds',title:'实收款',width:100,align:'center'},
								{field:'arrears',title:'欠款',width:100,align:'center'},
								{field:'date',title:'消费日期',width:120,align:'center'},
								{field:'gxsj',title:'最后一次还款日期',width:120,align:'center'},
								{field:'zffs',title:'支付方式',width:120,align:'center'},
								{field:'czy',title:'操作员',width:120,align:'center'},
								{field:'detail',title:'操作',width:120,align:'center',
									formatter: function(value,row,index){
						  				var ids = row.ids;
										return '<a href="#" style="color: blue;" class="button-edit" onclick="lookExpenseDetail(\'' + ids + '\')">查看明细</a>';
									}	
								}
						    ]]
				})
			}
			
			//查看明细
			function lookExpenseDetail(ids){
				loadViewDialog('查看消费明细', '${cxt!}/customerInfoStatistic/toLookCustomerExpenseDetail?orderIds=' + ids);
			}
		</script>
